package org.freespace.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.freespace.model.JmxPlugin;
import org.freespace.mapper.JmxPluginMapper;
import org.freespace.service.IJmxPluginService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.freespace.vo.JmxPluginVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * jmx插件表 服务实现类
 * </p>
 *
 * @author liuqi
 * @since 2023-04-28
 */
@Service
public class JmxPluginServiceImpl extends ServiceImpl<JmxPluginMapper, JmxPlugin> implements IJmxPluginService {

    @Autowired
    JmxPluginMapper jmxPluginMapper;

    @Override
    public IPage<JmxPlugin> unBindPageList(JmxPluginVO vo) {
        Page<JmxPlugin> page = new Page<>(vo.getCurrentPage(), vo.getPageSize());
        IPage<JmxPlugin> data = jmxPluginMapper.unBindPage(page, vo);
        return data;
    }

    @Override
    public IPage<JmxPlugin> bindPageList(JmxPluginVO vo) {
        Page<JmxPlugin> page = new Page<>(vo.getCurrentPage(), vo.getPageSize());
        IPage<JmxPlugin> data = jmxPluginMapper.bindPage(page, vo);
        return data;
    }

}
